package com.example.nftapp.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.nftapp.R;

public class MarketListAdapter extends RecyclerView.Adapter<MarketListAdapter.MVHolder> {
    @NonNull
    @Override
    public MarketListAdapter.MVHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.market_list_item, parent, false);
        return new MVHolder(v);
    }

    @Override
    public void onBindViewHolder(@NonNull MarketListAdapter.MVHolder holder, int position) {
        holder.num.setText(position + 1 + "");

    }

    @Override
    public int getItemCount() {
        return 10;
    }

    public class MVHolder extends RecyclerView.ViewHolder {
        TextView num;
        public MVHolder(@NonNull View itemView) {
            super(itemView);
            num =itemView.findViewById(R.id.market_list_item_num);
            //num =itemView.findViewById(R.id.market_list_item_png);
        }
    }
}
